package com.tourism.dao;

import com.tourism.entity.CustomLine;
import com.tourism.entity.CustomLineQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description定制线路dao
 * @Author z
 * @Date 2021-04-18 17:00
 */
@Mapper
public interface CustomLineDao {
    /**
     * 新增线路定制id
     *
     * @param customLine
     * @return
     */
    boolean addCustomLine(CustomLine customLine);
    /**
     * 修改线路定制id
     *
     * @param customLine
     * @return
     */
    boolean updateCustomLine(CustomLine customLine);


    /**
     * 根据id查找线路定制
     *
     * @param id
     * @return
     */
    CustomLine getCustomLineById(Long id);

    /**
     * 根据id删除线路定制
     *
     * @param id
     * @return
     */
    Boolean deleteCustomLineById(Long id);

    /**
     * 根据线路名查找线路定制id
     *
     * @param id
     * @param accept
     * @return
     */
    Boolean updateCustomLineAccept(@Param("id") Long id, @Param("accept") Boolean accept);

    /**
     * 获取线路定制列表
     *
     * @param query
     * @return
     */
    List<CustomLine> getCustomLineList(CustomLineQuery query);
}
